//
// Created by baka on 2025/9/24.
//

#ifndef STM32F407IGT6_LED_H
#define STM32F407IGT6_LED_H


#include <stdint.h>

#include "cmsis_os.h"
#include "stm32f407xx.h"

extern osMessageQId ledQueueHandle;

#define LED_NUM 4
typedef void(*LedFunction)(void);
// 定义LED结构体
typedef struct {
    GPIO_TypeDef* port;  // GPIO端口
    uint16_t pin;        // GPIO引脚
    uint8_t state;       // LED状态（0: 关闭，1: 打开）
    LedFunction callback;
    LedFunction led_on;
    LedFunction led_off;
} LED_HandleTypeDef;


void led_task_init(void);
void LED_TEST(void);

#endif //STM32F407IGT6_LED_H